/**
* <p>Title: HostsBo.java</p>
* <p>Description: </p>
* <p>Copyright: </p>
* <p>Company: </p>
* @author du
* @date 2018年2月4日
* @version 1.0
*/   
package com.ds.atops.config.bo;

import com.ds.atops.common.utils.StringUtils;

/**  
* 创建时间：2018年2月4日 下午5:44:42  
* 项目名称：ds-sys-devops  
* @author du
* @version 1.0   
* @since JDK 1.7
* 文件名称：HostsBo.java  
* 类说明：  
*/
/**
* <p>Title: HostsBo</p>
* <p>Description: </p>
* <p>Company: </p> 
* @author du
* @date 2018年2月4日
*/
public class HostsBo {

	private String host;
	
	private String connection;
	
	private String sshUser;
	
	private String sshPass;
	
	private String group;

	private String tip;
	
	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public String getConnection() {
		return connection;
	}

	public void setConnection(String connection) {
		this.connection = connection;
	}

	public String getSshUser() {
		return sshUser;
	}

	public void setSshUser(String sshUser) {
		this.sshUser = sshUser;
	}

	public String getSshPass() {
		return sshPass;
	}

	public void setSshPass(String sshPass) {
		this.sshPass = sshPass;
	}

	public String getGroup() {
		return group;
	}

	public void setGroup(String group) {
		this.group = group;
	}

	public String getTip() {
		return tip;
	}

	public void setTip(String tip) {
		this.tip = tip;
	}
	
	/* （非 Javadoc）
	* <p>Title: toString</p>
	* <p>Description: </p>
	* @return
	* @see java.lang.Object#toString()
	*/
	@Override
	public String toString() {
		String rs=this.getHost();
	
		if (StringUtils.isNotBlank(connection)) {
			rs+="\t"+"ansible_connection="+connection;
		}
		if (StringUtils.isNotBlank(sshUser)) {
			rs+="\t"+"ansible_ssh_user="+sshUser;
		}
		if (StringUtils.isNotBlank(sshPass)) {
			rs+="\t"+"ansible_ssh_pass="+sshPass;
		}
		if (StringUtils.isNotBlank(tip)) {
			rs+="\t"+"#"+tip;
		}
		rs+="\n";
		return rs;
	}
	
}
 